<?php

namespace App\Http\Controllers\Api;

use App\Services\RSADecrypter;
use App\Services\AESCrypter;
use App\Http\Controllers\ApiController;
use Illuminate\Http\Request;
use App\Models\Question;
use App\Models\User;
use Illuminate\Support\Facades\DB;

class InfoController extends ApiController
{
    /**
     * 返回题库状态
     * @auth(1,2,3)
     */
    public function index()
    {
        return $this->success(
            Question::select('question_type', DB::raw('COUNT(*) AS num'))->groupBy('question_type')->get()
        );
    }
}
